VT-d: improve RMRR validity checking
authorKeir Fraser <keir.fraser@citrix.com>
Thu, 21 Jan 2010 09:12:01 +0000 (09:12 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Thu, 21 Jan 2010 09:12:01 +0000 (09:12 +0000)
commit3a007e1577a578f525f4c2b895cf098e9c72509a
tree52afb9e6d2629ffe94f4e68d8d1287443167a590
parent1ac4cf5651e58f177621450342a943ee5457cf0a
VT-d: improve RMRR validity checking

Currently, Xen checks RMRR range and disables VT-d if RMRR range is
set incorrectly in BIOS rigorously. But, actually we can ignore the
RMRR if the device under its scope are not pci discoverable, because
the RMRR won't be used by non-existed or disabled devices.

This patch ignores the RMRR if the device under its scope are not pci
discoverable, and only checks the validity of RMRRs that are actually
used. In order to avoid duplicate pci device detection code, this
patch defines a function pci_device_detect for it.

Signed-off-by: Weidong Han <weidong.han@intel.com>
xen/drivers/passthrough/pci.c
xen/drivers/passthrough/vtd/dmar.c
xen/include/xen/pci.h